const client = require('../config')

const UploadOss = (k,y) =>{
  client.put(k,y).then(function (val) {
    console.log(val.res);
  })
}

;(async()=>{
  let movies = [{
    video: 'http://vt1.doubanio.com/201803121225/20b3814ae8f31c390b08944d6c28ff90/view/movie/M/302260827.mp4',
    doubanId: '6390825',
    paster:'https://img1.doubanio.com/view/photo/l_ratio_poster/public/p2515458639.jpg',
    cover: 'https://img3.doubanio.com/img/trailer/medium/2515715320.jpg?1520505787' }]

    movies.map(async movie => {
      if(movie.video){
        try{
          let videoData = UploadOss('302260827.mp4','../')
        }catch(err){
          console.log(err)
        }
      }
    })
})()
